<template>
	<view  class="select-box" :style="selectType?'background: linear-gradient(to bottom,#62A4E8,#CBE1F2);':'background:#fff;'" @click="choose">
		<view class="box" :style="selectType?'color: #fff;':'color: #000;'">
			<view class="title">
				{{item.partNo}}
			</view>
			<view class="title">
				{{item.partName}}
			</view>
			<view class="title">
				库存:{{Number(item.partQty).toFixed(0)}}
			</view>
		</view>
		<img :src="$imgUrl('login/loginIcon.png')" v-if="selectType"  style="width: 280rpx;height: 180rpx;" alt="">
	</view>
</template>

<script>
	export default{
		props:{
			item:{type:Object,default:()=>{}}
		},
		data(){
			return {
				selectType:false,
				value:0
			}
		},
		methods:{
			choose(){
				// this.$emit('update:selectType',!this.selectType)
				this.selectType = !this.selectType
				this.$emit('getSelect',this.item)				
			}
		}
	}
</script>

<style lang="scss" scoped>
	.select-box{
		display: flex;
		flex-direction: row;
		justify-content: space-between;
		padding: 16rpx 32rpx 0 16rpx; 
		// background-color: #fff;
		align-items: center;
		// background: linear-gradient(to bottom,#62A4E8,#CBE1F2);
		.box{
			width: 100%;
			height: 180upx;	
			color: #fff;
			:first-child{
				font-size: 32upx;
			}
			:nth-child(2){
				margin-top: 12rpx;
			}
			:nth-child(3){
				margin-top: 8rpx;
			}
		}
		.circle{
			width: 60rpx;
			height: 60rpx;
			border: 1px solid $bg-color;
			border-radius: 50%;
		}
	}
	
</style>
